<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>申请进度</title>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/tpshop.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/myaccount.css" />
    <script src="__STATIC__/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
    <script type="text/javascript" src="__ROOT__/public/static/js/layer/laydate/laydate.js"></script>
</head>
<body class="bg-f5">
<include file="user/header"/>
<div class="home-index-middle">
    <div class="w1224">
        <div class="g-crumbs">
            <a href="{:U('Home/User/index')}">我的商城</a>
            <i class="litt-xyb"></i>
            <span>我的订单</span>
        </div>
        <div class="home-main">
            <include file="user/menu"/>
            <div class="ri-menu fr">

                <div class="orderbook-list">
                    <div class="book-tit">
                        <ul>
                            <li class="sx2">名称</i></li>
                            <li class="sx2">型号</li>
                            <li class="sx3">规格</li>
                            <li class="sx4">供应商</li>
                            <li class="sx5">品牌</li>
                            <li class="sx6">产地</li>
                            <li class="sx2">状态</li>
                            <li class="sx2">操作</li>
                        </ul>
                    </div>
                </div>
                <div class="order-alone-li lastset_cm">
                    <empty name="list">
                        <div class="car-none-pl">
                            <i class="account-acco1"></i>您还没有申请
                        </div>
                        <else/>
                            <table width="100%" border="" cellspacing="" cellpadding="">
                                <volist name="list" id="list">
                                        <tr class="conten_or">
                                            <td class="sx2">
                                                {$list.name}
                                            </td>
                                            <td class="sx2">{$list.model}</td>
                                            <td class="sx3">
                                                {$list.spec}
                                            </td>
                                            <td class="sx4">
                                                {$list.supplier}
                                            </td>
                                            <td class="sx5">
                                                {$list.brand}
                                            </td>
                                            <td class="sx6">
                                                {$list.place}
                                            </td>
                                            <td class="sx2">
                                                <if condition="$list.status eq 0">
                                                    待审批
                                                <elseif condition="$list.status eq 1" />
                                                    通过
                                                <else />
                                                    拒绝 
                                                </if>
                                            </td>
                                            <td class="sx2">
                                                <if condition="$list.status eq 1">
                                                    <a href="">去申购</a>
                                                </if>
                                            </td>
                                        </tr>
                                </volist>
                            </table>
                    </empty>
                </div>
            </div>
            <div class="operating fixed" id="bottom">
                <div class="fn_page clearfix">
                    {$page}
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<!--footer-s-->
<div class="footer p">
    <include file="public/footer" />
</div>
<!--footer-e-->
<script type="text/javascript">
    $(function(){
        $('.s5clic').click(function(){
            $('.hid-derei').slideToggle(400);
            $(this).animate({opacity:"1"},200,function(){
                $(this).toggleClass('sxbb')
            })
        })
    })
    //取消订单
    function cancel_order(id){
        layer.confirm('确定取消订单?', {
                    btn: ['确定','取消'] //按钮
                }, function(){
                    // 确定
                    location.href = "/index.php?m=Home&c=Order&a=cancel_order&id="+id;
                }, function(index){
                    layer.close(index);
                }
        );
    }

    function jump()
    {
        var max_page = "{$page_array.total_page}";
        var jump_page = $('#jump_page').val();
        if(jump_page>0 && jump_page<=max_page){
            location.href = "<?php echo urldecode(U('Home/Order/order_list',$get_no_p,''));?>"+"/p/"+$('#jump_page').val();
        }else{
            layer.alert('请输入正确的页数', {icon: 2});
        }
    }
    //确定收货
    function order_confirm(order_id){
        layer.confirm("你确定收到货了吗?",{
            btn:['确定','取消']
        },function(){
            $.ajax({
                type : 'post',
                url : '/index.php?m=Home&c=Order&a=order_confirm&order_id='+order_id,
                dataType : 'json',
                success : function(data){
                    if(data.status == 1){
                        window.location.href = data.url;
                    }else{
                        layer.open({content:data.msg,time:2});
                        verify();
                    }
                },
                error : function(XMLHttpRequest, textStatus, errorThrown) {
                    layer.alert('网络失败，请刷新页面后重试', {icon: 2});
                }
            })
        }, function(index){
            layer.close(index);
        });
    }
    
	function refund_order(obj){
		layer.open({
			type: 2,
			title: '<b>订单取消申请</b>',
			skin: 'layui-layer-rim',
			shadeClose: true,
			shade: 0.5,
			area: ['600px', '500px'],
			content: $(obj).attr('data-url'),
		});
	}
</script>
</body>
</html>